import os
import win32file

def get_local_drive_list():
	'''get logical drive list'''
	disk_sign	= win32file.GetLogicalDrives()
	drive_list	=[]

	for i in range(25):
		if disk_sign & (1<<i):
			drive_list.append('%s:\\'%chr(ord('a')+i))
	
	return drive_list

def run():
	'''open the first finded u disk drive'''
	drive_list	= get_local_drive_list()
	#print(drive_list)
	for drive in drive_list:
		if win32file.GetDriveType(drive)== win32file.DRIVE_REMOVABLE:
			os.startfile(drive)
			return
	
	print('find no u disk')

if __name__=='__main__':
	run()
